/**
 * 
 */
package com.nars.datastructures;

/**
 * @author Student
 *
 */
public class TreeStarter {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		Tree<Integer> treeExample = new Tree<Integer>();
		
		TreeElement<Integer> treeElement1 = new TreeElement<Integer>();
		treeElement1.value = 1;
		treeExample.rootElement = treeElement1;
		
		TreeElement<Integer> treeElement2 = new TreeElement<Integer>();
		treeElement2.value = 12;		
		treeElement1.left = treeElement2;
		
		TreeElement<Integer> treeElement3 = new TreeElement<Integer>();
		treeElement3.value = 13;
		treeElement1.right = treeElement3;		
		
		treeExample.visitInOrder(treeElement1);	
		
		
		TreeElement<Integer> result = new TreeElement<Integer>();
		result = treeExample.search(13);
		System.out.println("Element " + result.value);
		
		//TreeElement<Integer> resultRecursively = new TreeElement<Integer>();
		treeExample.search(treeElement1, 15);
		//System.out.println("Element from Recurvcive " + resultRecursively.value);
		
		
		
	}
}
